package com.litaomn.fang.hotload.server;

import com.litaomn.fang.hotload.util.LogUtil;

import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;

import java.net.URI;

public class WebSocket extends WebSocketClient {

    public WebSocket(URI serverUri) {
        super(serverUri);
    }

    @Override
    public void onOpen(ServerHandshake handshakedata) {
        LogUtil.error("握手");
    }

    @Override
    public void onMessage(String message) {
        LogUtil.error("message:" + message);
    }

    @Override
    public void onClose(int code, String reason, boolean remote) {
        LogUtil.error("close");
    }

    @Override
    public void onError(Exception ex) {
        LogUtil.error("error");
    }
}
